package pers.qianyu.exception;

/**
 * @author mizzle rain
 * @date 2020-11-10 12:46
 */
public enum GlobalErrorCodeEnum implements ILambErrorCodeEnum {
    SYS_ERROR(3000, "服务器忙，请稍后再试"),
    RESOURCES_NOT_FOUND(3001, "对不起，您请求的资源不存在"),
    RATE_LIMIT_ERROR(3003, "对不起，您访问的速度太快，已被限流"),
    INVALID_PARAMETERS(3002, "对不起，参数错误");

    private final String message;
    private final Integer code;

    GlobalErrorCodeEnum(Integer code, String message) {
        this.message = message;
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public Integer getCode() {
        return code;
    }
}
